using System;
using System.Data;
using Utils;
using Utils.DatabaseUtils;


namespace DCEdu
{
public class TutorProfile
{ 
	private int iD;
	public int ID
	{
		get { return iD;}
		set { iD = value;}
	}

	private String name;
	public String Name
	{
		get { return name;}
		set { name = value;}
	}

	private bool gender;
	public bool Gender
	{
		get { return gender;}
		set { gender = value;}
	}

	private int iDNumber;
	public int IDNumber
	{
		get { return iDNumber;}
		set { iDNumber = value;}
	}

	private String address;
	public String Address
	{
		get { return address;}
		set { address = value;}
	}

	private DateTime birthday;
	public DateTime Birthday
	{
		get { return birthday;}
		set { birthday = value;}
	}

	private String phone;
	public String Phone
	{
		get { return phone;}
		set { phone = value;}
	}

	private String email;
	public String Email
	{
		get { return email;}
		set { email = value;}
	}

	private int education;
	public int Education
	{
		get { return education;}
		set { education = value;}
	}

	private String university;
	public String University
	{
		get { return university;}
		set { university = value;}
	}

	private String specialize;
	public String Specialize
	{
		get { return specialize;}
		set { specialize = value;}
	}

	private int job;
	public int Job
	{
		get { return job;}
		set { job = value;}
	}

	private String mark;
	public String Mark
	{
		get { return mark;}
		set { mark = value;}
	}

	private String image;
	public String Image
	{
		get { return image;}
		set { image = value;}
	}

	private String subjects;
	public String Subjects
	{
		get { return subjects;}
		set { subjects = value;}
	}

	private String _class;
	public String Class
	{
		get { return _class;}
		set { _class = value;}
	}

	private int transportation;
	public int Transportation
	{
		get { return transportation;}
		set { transportation = value;}
	}

	private String experience;
	public String Experience
	{
		get { return experience;}
		set { experience = value;}
	}

	private double salary;
	public double Salary
	{
		get { return salary;}
		set { salary = value;}
	}

	private String place;
	public String Place
	{
		get { return place;}
		set { place = value;}
	}

	private String time;
	public String Time
	{
		get { return time;}
		set { time = value;}
	}

	private String description;
	public String Description
	{
		get { return description;}
		set { description = value;}
	}

	public TutorProfile() {}

	public TutorProfile(int iD, String name, bool gender, int iDNumber, String address, DateTime birthday, String phone, String email, int education, String university, String specialize, int job, String mark, String image, String subjects, String _class, int transportation, String experience, double salary, String place, String time, String description)
	 {
		this.iD = iD;
 		this.name = name;
 		this.gender = gender;
 		this.iDNumber = iDNumber;
 		this.address = address;
 		this.birthday = birthday;
 		this.phone = phone;
 		this.email = email;
 		this.education = education;
 		this.university = university;
 		this.specialize = specialize;
 		this.job = job;
 		this.mark = mark;
 		this.image = image;
 		this.subjects = subjects;
 		this._class = _class;
 		this.transportation = transportation;
 		this.experience = experience;
 		this.salary = salary;
 		this.place = place;
 		this.time = time;
 		this.description = description;
 	}

	public int Add(String name, bool gender, int iDNumber, String address, DateTime birthday, String phone, String email, int education, String university, String specialize, int job, String mark, String image, String subjects, String _class, int transportation, String experience, double salary, String place, String time, String description)
	{
		try
		{
			int result = SqlHelper.ExecuteNonQuery(Common.Conn,"TutorProfile_Add",name,gender,iDNumber,address,birthday,phone,email,education,university,specialize,job,mark,image,subjects,_class,transportation,experience,(decimal)salary,place,time,description);
			return result;
		}
		catch(Exception e) {return -1; }
	}

	public int Update(int iD, String name, bool gender, int iDNumber, String address, DateTime birthday, String phone, String email, int education, String university, String specialize, int job, String mark, String image, String subjects, String _class, int transportation, String experience, double salary, String place, String time, String description)
	{
		try
		{
			int result = SqlHelper.ExecuteNonQuery(Common.Conn,"TutorProfile_Update",iD,name,gender,iDNumber,address,birthday,phone,email,education,university,specialize,job,mark,image,subjects,_class,transportation,experience,salary,place,time,description);
			return result;
		}
		catch(Exception e) {return -1; }
	}

	public int Delete(int iD)
	{
		try
		{
			int result = SqlHelper.ExecuteNonQuery(Common.Conn,"TutorProfile_Delete",iD);
			return result;
		}
		catch(Exception e) {return -1; }
	}

	public int DeleteAll()
	{
		try
		{
			int result = SqlHelper.ExecuteNonQuery(Common.Conn,"TutorProfile_DeleteAll");
			return result;
		}
		catch(Exception e) {return -1; }
	}

	public DataSet Get(int iD)
	{
		try
		{
			DataSet result = SqlHelper.ExecuteDataset(Common.Conn,"TutorProfile_Get",iD);
			return result;
		}
		catch(Exception e) {return null; }
	}

	public DataSet GetAll()
	{
		try
		{
			DataSet result = SqlHelper.ExecuteDataset(Common.Conn,"TutorProfile_GetAll");
			return result;
		}
		catch(Exception e) {return null; }
	}

} 
}
